<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>二级分类页面</title>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/common.css" />
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/ej_class.css" />
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/yhzx.css" />
<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery-1.11.2.min.js"></script>
<script type="text/javascript">
	$(function(){
		$("#cancelCollect").click(function(){
			var ids = "";
			$(":checkbox[name]:checked").map(function(){
				ids += ","+$(this).val()
			})
			ids = ids.substring(1);
			if(confirm("确认取消收藏？")){
				$.ajax({
					type:"post",
					url:"<%=request.getContextPath()%>/collect/cancelCollect",
					data:{ids:ids},
					success:function(obj){
						alert("取消收藏成功");
						location.href="<%=request.getContextPath()%>/collect/personalCollect?uid=${uid}";
					},
					dataType:"json"
				})
			}
		})
		<%-- $("#qxsc").click(function(){
			var ids = "";
			$(":checkbox[name]:checked").map(function(){
				ids += ","+$(this).val()
			})
			ids = ids.substring(1);
			if(confirm("确认取消收藏？")){
				$.ajax({
					type:"post",
					url:"<%=request.getContextPath()%>/collect/cancelCollect",
					data:{ids:ids},
					success:function(obj){
						alert("取消收藏成功");
						location.href="<%=request.getContextPath()%>/collect/personalCollect?uid=${uid}";
					},
					dataType:"json"
				})
			}else{
				alert("取消收藏成功");
			}
		}) --%>
		/* $("[name='checkbox2']").click(function(){
			if($(this).attr("checked")){
				$("[name='ck']").attr("checked",true);
			}else{
				$("[name='ck']").attr("checked",false);
			}
		}) */
	})
</script>
</head>
<body>
<%@ include file="menu.jsp" %>
<div class="w_980 m">
  <div class="pos fl_l ma_t10"><a href="#">首页</a> > <a href="#">礼品箱包、钟表首饰</a> > <a href="#">时尚男包</a> > BOSSSUNWEN博斯绅威男士横款钱包高档礼盒S9... </div>
  <div class="w_980 fl_l">
	<div class="l_200">
                <div class="yhzx">
                	<h2>个人中心</h2>
                    <ul>
                    	<li><a href="<%=request.getContextPath()%>/welcome/yhzx_hyy?uid=${user.uid}">欢迎页</a></li>
                        <li><a href="<%=request.getContextPath()%>/personal/personalmessage?uid=${user.uid}">用户信息</a></li>
                        <li><a href="<%=request.getContextPath()%>/order/personalOrder?uid=${user.uid}">我的订单</a></li>
                        <li><a href="<%=request.getContextPath()%>/site/personalSite?uid=${user.uid}">收货地址</a></li>
                        <li class="sel"><a href="<%=request.getContextPath()%>/collect/personalCollect?uid=${user.uid}">我的收藏</a></li>
                        <li><a href="<%=request.getContextPath()%>/leaveword/personalleave?uid=${user.uid}">我的留言</a></li>
                        <li><a href="<%=request.getContextPath()%>/comment/personalcomment?uid=${user.uid}">我的评论</a></li>                                                                        
                        <li><a href="<%=request.getContextPath()%>/personal/exit">安全退出</a></li>                               
                    </ul>
                </div>
		  </div>  
  	<div class="w_770_bor">
           	  <div class="yhzx_title">我的留言</div>
              <div class="hyy fl_l">
				<table width="80%" border="0" cellspacing="0" cellpadding="0" class="basic te_m">
                  <tr>
                    <td width="36">&nbsp;</td>
                    <td width="69">商品图片</td>
                    <td width="356">商品名称</td>
                    <td width="88">价格</td>
                    <td width="124">操作</td>
                  </tr>
                  <c:forEach var="u" items="${collect }">
                  <tr>
                    <td><input type="checkbox" name="ck" class="check" id="checkbox" value="${u.cid }" /></td>
                    <td><img src="<%=request.getContextPath() %>/${u.cimage}" width="45" height="45" /></td>
                    <td class="te_r"><a href="<%=request.getContextPath() %>/product/goods?pid=${u.pid}" class=" redfont">${u.cname }</a><br/>
                      <span class="font_999">收藏时间：${u.cdate }</span></td>
                    <td><span class=" pa_b5"><span class="font_red font_c_14">￥${u.cshopPrice }</span> 元</span></td>
                    <td>
                    <input type="submit" name="button" value="加入购物车" class="btn" /><br/>
                   	<a href="<%=request.getContextPath()%>/collect/cancelsingle?id=${u.cid }&uid=${uid}">取消收藏</a></td>
                  </tr>
                  </c:forEach>
                </table>
                <p  class="te_r">
                  <!-- <input type="checkbox" name="checkbox2" id="checkAll" class="qx" />
                  	全选 -->
                  <input type="submit" name="button2" value="加入购物车" class="btn" />
                  <a id="cancelCollect" href="#">取消收藏</a></p>
  </div>
			</div>
  </div>
  <div class="w_980 fl_l ma_t10 te_m">关于我们 | 联系我们 | 人才招聘 | 商家入驻 | 广告服务 | 移动终端 | 友情链接 | 销售联盟 <br />
    北京市公安局海淀分局备案编号：11010233381  京ICP证070的4523号 <br />
    Copyright2004-2011  五金商城 版权所有</div>
  <div class="w_980 fl_l ma_t10">
    <ul class="footerpic">
      <li><a href=" "><img src="<%=request.getContextPath() %>/images/footer_pic_04.gif" width="91" height="31" /></a></li>
      <li><a href=" "><img src="<%=request.getContextPath() %>/images/footer_pic_05.gif" width="91" height="31" /></a></li>
      <li><a href=" "><img src="<%=request.getContextPath() %>/images/footer_pic_06.gif" width="91" height="31" /></a></li>
      <li><a href=" "><img src="<%=request.getContextPath() %>/images/footer_pic_07.gif" width="91" height="31" /></a></li>
      <li><a href=" "><img src="<%=request.getContextPath() %>/images/footer_pic_09.gif" width="91" height="31" /></a></li>
      <li><a href=" "><img src="<%=request.getContextPath() %>/images/footer_cnnic.jpg" width="91" height="31" /></a></li>
    </ul>
  </div>
</div>
</body>
</html>
